package nc.ui.ct.ctorderappro;

import java.awt.Container;

import nc.ui.pub.ClientEnvironment;
import nc.ui.pub.beans.UIPanel;
import nc.ui.pub.pf.IinitQueryData2;
import nc.ui.trade.query.HYQueryDLG;
import nc.vo.ct.consts.PubConsts;
import nc.vo.scm.pu.PuPubVO;

public class BillQueryDlg extends HYQueryDLG implements IinitQueryData2{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	static Container parent = null;
	static UIPanel normalPnl = null;
	static String pk_corp =  ClientEnvironment.getInstance().getCorporation().getPrimaryKey();
	static String moduleCode = null;
	static String operator = ClientEnvironment.getInstance().getUser().getPrimaryKey();
	static String busiType =  null;
	static String nodeKey =  null;

	public BillQueryDlg(Container parent) {
		super(parent,null,pk_corp,PubConsts.bill_node_cght,operator,null,null);
	}


	public BillQueryDlg(Container parent, UIPanel normalPnl, String pk_corp,
			String moduleCode, String operator, String busiType, String nodeKey) {
		super(parent, normalPnl, pk_corp, moduleCode, operator, busiType, nodeKey);
		// TODO Auto-generated constructor stub
	}


	public BillQueryDlg(Container parent, UIPanel normalPnl, String pk_corp,
			String moduleCode, String operator, String busiType) {
		super(parent, normalPnl, pk_corp, moduleCode, operator, busiType);
		// TODO Auto-generated constructor stub
	}


	
	@Override
	public String getWhereSQL() {
		String sql =super.getWhereSQL();
		
		if(PuPubVO.getString_TrimZeroLenAsNull(sql) == null)
			return null;
		
		sql =sql.replace("ct_manage.operdate.from", "ct_manage.operdate");
		sql =sql.replace("ct_manage.operdate.end", "ct_manage.operdate");
		sql =sql+" and ct_manage.ctflag='2'";
		return sql;
	}

	public void initData(String pkCorp, String operator, String funNode,
			String businessType, String currentBillType, String sourceBilltype,
			String nodeKey, Object userObj) throws Exception {
		
			}

	
}
